//
//  DepoistMoneyListCell.swift
//  d11
//
//  Created by peale on 2018/10/21.
//  Copyright © 2018年 Tech_001. All rights reserved.
//

import UIKit

class DepoistMoneyListCell: UICollectionViewCell {
    var titleLabel: UILabel!
    
    override init(frame:CGRect){
        super.init(frame: frame)
        setupUI()
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI(){
        self.titleLabel = UILabel()
        self.titleLabel.font = UIFont.systemFont(ofSize: 15)
        self.titleLabel.textAlignment = .center
        self.titleLabel.textColor = HexRGBAlpha(0x555555, 1)
        self.titleLabel.backgroundColor =  HexRGBAlpha(0xE9E9E9, 1)
        self.titleLabel.layer.cornerRadius = 5;
        self.titleLabel.layer.masksToBounds = true
        self.contentView.addSubview(self.titleLabel)
        self.titleLabel?.snp.makeConstraints{(make) in
            make.width.equalToSuperview()
            make.height.equalToSuperview()
      //      make.centerX.equalTo(self.contentView)
        }
        self.backgroundColor = UIColor.white
    }
    
    func setData(moneyStr:String?,isSelect:Bool) -> Void {
        self.titleLabel.text =  moneyStr
        if isSelect == true {
             self.titleLabel.backgroundColor =  HexRGBAlpha(0xFFC873, 1)
        }else{
             self.titleLabel.backgroundColor =  HexRGBAlpha(0xE9E9E9, 1)
        }
    }
}
